UCF STIG Viewer Logo
Changes are coming to https://stigviewer.com. Take our survey to help us understand your usage and how we can better serve you in the future.
Take Survey

Keys from SSH authorized_keys file must be removed.


Overview

Finding ID Version Rule ID IA Controls Severity
SRG-OS-99999-ESXI5-000152 SRG-OS-99999-ESXI5-000152 SRG-OS-99999-ESXI5-000152_rule Medium
Description
ESXi hosts come with SSH which can be enabled to allow remote access without requiring user authentication. To enable password free access copy the remote users public key into the "/etc/ssh/keys-root/authorized_keys" file on the ESXi host. The presence of the remote user's public key in the "authorized_keys" file identifies the user as trusted, meaning the user is granted access to the host without providing a password. Note: Lockdown mode does not apply to root users who log in using authorized keys. When you use an authorized key file for root user authentication, root users are not prevented from accessing a host with SSH even when the host is in lockdown mode.
STIG Date
VMware ESXi v5 Security Technical Implementation Guide 2013-01-15

Details

Check Text ( C-SRG-OS-99999-ESXI5-000152_chk )

Temporarily disable Lockdown Mode and enable the ESXi Shell via the vSphere Client.

Open the vSphere/VMware Infrastructure (VI) Client and log in with appropriate credentials.
If connecting to vCenter Server, click on the desired host.
Click the Configuration tab.
Click Software, Security Profile, Services, Properties, ESXi Shell, and Options, respectively.
Start the ESXi Shell service, where/as required.

As root, log in to the host and verify the /etc/ssh/keys-root/authorized_keys file does not exist or is empty (zero bytes):
# ls -l /etc/ssh/keys-root/authorized_keys

If the authorized_keys file exists and is not empty, this is a finding.

Re-enable Lockdown Mode on the host.

Fix Text (F-SRG-OS-99999-ESXI5-000152_fix)


Temporarily disable Lockdown Mode and enable the ESXi Shell via the vSphere Client.

Open the vSphere/VMware Infrastructure (VI) Client and log in with appropriate credentials.
If connecting to vCenter Server, click on the desired host.
Click the Configuration tab.
Click Software, Security Profile, Services, Properties, ESXi Shell and Options, respectively.
Start the ESXi Shell service, where/as required.

As root, log in to the host and zero/remove /etc/ssh/keys-root/authorized_keys file:
# >/etc/ssh/keys-root/authorized_keys
or
# rm /etc/ssh/keys-root/authorized_keys

Re-enable Lockdown Mode on the host.